import request from '@/sheep/request';

const ReservationApi = {
    // 创建预约
    createReservation: (data) => {
        return request({
            url: '/trade/reservation/create',
            method: 'POST',
            data
        });
    },

    // 预约生产
    markReservationAsProduced: (data) => {
        return request({
            url: '/trade/reservation/produced',
            method: 'POST',
            data
        });
    },

    // 预约完成
    completeReservation: (data) => {
        return request({
            url: '/trade/reservation/complete',
            method: 'POST',
            data
        });
    },

    // 获得预约分页
    getReservationPage: (params) => {
        return request({
            url: '/trade/reservation/page',
            method: 'GET',
            params,
        });
    },
}

export default ReservationApi;